home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacMETH 3.2.1 / Sources / MacC2.6 / M2SM.DEF < prev    next >
Encoding:
Modula Definition  |  1992-05-29  |  1.4 KB  |  43 lines  |  [TEXT/MEDT]

  1. DEFINITION MODULE M2SM; (* NW 17.8.83 / 15.12.85 *)
  2.  
  3.   FROM FileSystem IMPORT File;
  4.  
  5.   CONST IdBufLeng = 28000;
  6.  
  7.   TYPE  Symbol = (null,
  8.         times, slash, div, rem, mod, and,
  9.         plus, minus, or,
  10.         eql, neq, lss, leq, gtr, geq, in,
  11.         arrow, period, comma, colon, ellipsis, rparen, rbrak, rbrace,
  12.         of, then, do, to, by,
  13.         lparen, lbrak, lbrace, not, becomes, number, string, ident,
  14.         semicolon, bar, end, else, elsif, until,
  15.         if, while, repeat, loop, with, exit, return, case, for,
  16.         array, pointer, record, set,
  17.         begin, code, const, type, var, forward, procedure, module,
  18.         definition, implementation, export, qualified, from, import, eof);
  19.  
  20.   (* sym, id, numtyp, intval, dblval, realval, lrlval are implicit results of GetSym *)
  21.  
  22.   VAR sym   : Symbol;
  23.     id      : INTEGER;
  24.     numtyp  : INTEGER;
  25.        (* 1 = card/int, 2 = longint, 3 = char, 4 = real, 5 = longreal *)
  26.     intval  : CARDINAL;
  27.     dblval  : LONGINT;
  28.     realval : REAL;
  29.     lrlval  : LONGREAL;
  30.     scanerr : BOOLEAN;
  31.     source  : File;
  32.     IdBuf   : ARRAY [0..IdBufLeng-1] OF CHAR; (*identifier buffer*)
  33.  
  34.   PROCEDURE InitScanner(filename: ARRAY OF CHAR);
  35.   PROCEDURE Diff(i, I: INTEGER): INTEGER;
  36.   PROCEDURE Enter(id: ARRAY OF CHAR): INTEGER;
  37.   PROCEDURE KeepId;
  38.   PROCEDURE GetSym;
  39.   PROCEDURE Mark(n: INTEGER);
  40.   PROCEDURE CloseScanner;
  41.  
  42. END M2SM. (* Copyright Departement Informatik, ETH Zuerich, Switzerland, 1992 *)
  43.